export PROJET=iFlyBot-IV

export CC=gcc
export CFLAGS=-g -Wall -Wextra
export LDFLAGS=-lpthread -lSDL
EXEC=testXbee
SRC= $(wildcard *.c)
OBJ= $(SRC:.c=.o)


all: $(EXEC)

testXbee: libXbee.o testXbee.o suiviroute.o
	@$(CC) -o $@ $^ $(LDFLAGS)

libXbee.o: libXbee.h


%.o: %.c
	@$(CC) -c $< $(CFLAGS)

.PHONY: clean mrproper all $(EXEC)

clean:
	@rm -f *.o

mrproper: clean
	@rm -f $(EXEC)

tar: mrproper
	@tar -czf ../"$(PROJET) $(EXEC)".tar.gz ./*

zip: mrproper
	@zip -r ../"$(PROJET) $(EXEC)" ./*

